package ExerciseFoure;

public class EmployeeTest {

	public static void main(String[] args) {
		Manger manger = new Manger("石文学",1002,10000,20000);
		manger.work();
		System.out.println(manger.getName());
		CommonEmployee com = new CommonEmployee();
		com.work();

		//多态
		Employee employee = new Manger();
		employee.work();
		Manger man = (Manger)employee;//向下转型
		man.setName("普元庆");
		System.out.println(man.getName());
	}

}
